bool CheckFrameFormate(unsigned char *data, unsigned char &heartbeat)
{

    return true;
}

void DecodeControlFrame(unsigned char *data, double &speed, double &brake, double &steer)
{
    speed = data[3];
    brake = data[6];
    steer = data[5] << 8 | data[4];
}

void DecodeHighIOFrame(unsigned char *data, unsigned char &emergencyustop)
{
    emergencyustop = ((data[3] & 0b1100) >> 2) == 0b10;
}